package com.ny.mapper;
import com.ny.entity.Device1;
import com.ny.entity.Result;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Optional;

@Repository
public interface DeviceRepository extends MongoRepository<Device1, String> {
    //根据设备名称查询设备数据
    List<Device1> findDeviceByname(String name);
    //根据设备编号查询设备
    Optional<Device1> findByDeviceNo(String deviceNo);
    //根据设备名称模糊查询设备数据
    List<Device1> findByNameContaining(String name);


}